<template lang="">
    <div>
        {{form.name}}
        {{count}}
        <button @click='change'>点击</button>
    </div>
</template>
<script>

import {reactive,ref,onMounted} from 'vue'
import axios from '../http/axios'
export default {
    setup() {
        let form=reactive({'name':'123','password':'sdf'})
        let count=ref(0)
        //点击值改变
        const change=()=>{
            form.name='abc'
            count.value=12
           
            axios('test','get').then(res=>{
                console.log(res)
            })
        }
        //钩子方法
        onMounted(() => {
            change()
        })
        return{
            form,
            count,
            change
        }
    }
}
</script>
<style lang="">
    
</style>